<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="/Static/pc/css/basic.css"/>
<link rel="stylesheet" type="text/css" href="/Static/pc/css/denglu.css"/>
<script type="text/javascript" src="/Static/pc/js/jquery.js"></script>
<title>登录页面</title>
</head>

<body>
<include file="top"/>
<div data-am-sticky data-am-sticky="{top:100}" >
<div class="head">
<div class="head_top">
    <div class="logo">
    	<a href="index.html">
        	<img src="/Static/pc/images/logo.png" />
        </a>
    </div>
    <div class="submit">
        <input type="text" class="btn"  name="keyword" value="牛人理财师" onfocus="if (value =='牛人理财师'){value =''}" onblur="if (value ==''){value='牛人理财师'}"> 
          <i class="sub" title="搜索"></i>	
    </div>
    <include file="_nav" />
</div>
</div>
</div>

<div class="sty_container">
	<div class="sty_topbox">
	<div class="denglu_top">
    	<a>账号登录</a>
    </div>
  <div class="denglu_bottom">
    	 <input type="text" id="username" name="username" class="text_class" placeholder="邮箱，用户名">
    	 <input type="password" id="password" name="keyworld" class="text1_class" placeholder="密码">
         <div class="sty_bottn">
         	<input type="checkbox" class="checkbox" />
            <p>下次自动登录</p>
            <span class="sty_bottn_l"><a href="">忘记密码？</a></span>
         </div>
         <div class="denglu" style="cursor: pointer" onclick="doLogin()">登录</div>
         
  </div>
  </div>
</div>


<!--导航下拉-->
<script type="text/javascript">
	$(function(){
            $('#nav_li>li').mouseover(function(){
                $(this).children('ul').show();
                    $(this).siblings().children('ul').hide()
        });
            $('#nav_li>li').mouseleave(function(){
                $(this).find("ul").hide(500);
        });
    });
    function doLogin(){
        var username = $("#username").val();
        var password = $("#password").val();
        if(username == "") return alert("请输入邮箱/手机号码！");
        var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
        if (!filter.test(username)){
            filter = /^1\d{10}$/;
            if(!filter.test(username)) return alert("请输入正确的邮箱或手机号码！");
        }
        if(password == "") return alert("请输入密码！");

        jQuery.post("doLogin",{username:username,password:password},function(data){
            if(data.status == 0){
                alert(data.info);
            }else{
                alert("登陆成功");
                window.location.href="/";
            }
        });
    }
</script>
</body>
</html>
